﻿<Window x:Class="NetworkPower.UI.PreviewReport"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
        xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
        xmlns:local="clr-namespace:NetworkPower.UI"
        mc:Ignorable="d"
        Title="报表预览" Height="508.955" Width="877.618" WindowStartupLocation="CenterScreen">
    <Window.Resources>
        <local:UnitNameValueConvert x:Key="UNColorCvrt"/>
        <local:BackupCoreValueConvert x:Key="CoreColorCvrt"/>
    </Window.Resources>
    <Grid>
        <DataGrid x:Name="dataGrid" HorizontalAlignment="Left" Margin="32,42,0,0" VerticalAlignment="Top" RenderTransformOrigin="-5.167,-6.846" Height="407" Width="810" AutoGenerateColumns="False" CanUserAddRows="false" CellEditEnding="dataGrid_CellEditEnding">
            <DataGrid.Columns>
                <DataGridTextColumn Binding="{Binding UnitId,Converter={StaticResource UNColorCvrt}}" Header="安装单位名称" IsReadOnly="True"/>
                <DataGridTextColumn Binding="{Binding CableNumber}" Header="电缆编号"/>
                <DataGridTextColumn Binding="{Binding CableType}" Header="电缆型号及芯数×截面"/>
                <DataGridTextColumn Binding="{Binding BackUpCoreCount,Converter={StaticResource CoreColorCvrt}}" Header="备用芯" IsReadOnly="True"/>
                <DataGridTextColumn Binding="{Binding StartCircleNo}" Header="回路编号" IsReadOnly="True"/>
                <DataGridTextColumn Binding="{Binding StartTerminalNo}" Header="端子号" IsReadOnly="True"/>
                <DataGridTextColumn Binding="{Binding Start}" Header="起        点" IsReadOnly="True"/>
                <DataGridTextColumn Binding="{Binding EndCircleNo}" Header="回路编号" IsReadOnly="True"/>
                <DataGridTextColumn Binding="{Binding EndTerminalNo}" Header="端子号" IsReadOnly="True"/>
                <DataGridTextColumn Binding="{Binding End}" Header="终        点" IsReadOnly="True"/>
                <DataGridTextColumn Binding="{Binding LineLength}" Header="长度(米)" IsReadOnly="True"/>
                <DataGridTextColumn Binding="{Binding Remarks}" Header="备 注" IsReadOnly="True"/>
            </DataGrid.Columns>
        </DataGrid>
        <Button x:Name="btnPreview" Content="打印" HorizontalAlignment="Left" Margin="32,11,0,0" VerticalAlignment="Top" Width="75" Click="btnPreview_Click"/>
        <Button x:Name="btnCancel" Content="取消" HorizontalAlignment="Left" Margin="121,11,0,0" VerticalAlignment="Top" Width="75" Click="btnCancel_Click"/>

    </Grid>
</Window>
